<div class="row" ng-keydown="vm.Enter($event)">
    <div class="col s12">
        <div class="clearfix pt20">
            <!-- 店铺类目 -->
            <div id="selectBoxCat" class="left mr20 center-align" ng-if="vm.option.mainCat" uib-dropdown>
                <a href="javascript:;" id="mainCat-dropdown" class="z-depth-1" uib-dropdown-toggle>
                    {{vm.copy.mainCat||"全部"}}<i class="fa fa-caret-down pl4"></i>
                </a>
                <ul class="dropdown-content" style="max-height: 240px;overflow-y: auto;" uib-dropdown-menu aria-labelledby="mainCat-dropdown">
                    <li ng-repeat="cat in vm.mainCategorys track by $index">
                        <a href="javascript:;" ng-click="vm.mainCatSelect(cat.mainCategory)">{{::cat.mainCategory}}</a>
                    </li>
                </ul>                
            </div>
            <!-- 类目 -->
            <div id="selectBox" class="left mr20 center-align" style="line-height: 53px;" ng-if="vm.option.category">
                <global-category-component type="vm.option.category.type" select-text="vm.option.category.selectText" category="vm.copy.category" is-leaf="vm.option.category.isLeaf" list-default="vm.option.category.default" category-option="vm.option.category"></global-category-component>
            </div>
            <!-- 店铺类型 -->
            <div class="left mr20" ng-if="vm.option.shopType">
                <form class="shopTypeForm mr20 clearfix" style="line-height: 53px;">
                    <span>店铺类型 </span>
                    <span>
                        <input class="with-gap" name="group1" type="radio" id="shop_allnet_lasty" value="" ng-model="vm.copy.shopType" checked="checked">
                        <label for="shop_allnet_lasty">全网</label>
                    </span>
                    <span>
                        <input class="with-gap" name="group1" type="radio" id="shop_taobao_lasty" value="C店" ng-model="vm.copy.shopType">
                        <label for="shop_taobao_lasty">淘宝</label>
                    </span>
                    <span>
                        <input class="with-gap" name="group1" type="radio" id="shop_tianm_lasty" value="商城" ng-model="vm.copy.shopType">
                        <label for="shop_tianm_lasty">天猫</label>
                    </span>
                    <span>
                        <input class="with-gap" name="group1" type="radio" id="shop_thk_lasty" value="天猫国际" ng-model="vm.copy.shopType">
                        <label for="shop_thk_lasty">天猫国际</label>
                    </span>
                    <span>
                        <input class="with-gap" name="group1" type="radio" id="shop_g_lasty" value="全球购" ng-model="vm.copy.shopType">
                        <label for="shop_g_lasty">全球购</label>
                    </span>
                </form>
            </div>
            <!-- ifashion -->
            <div class="left" style="line-height: 53px;margin-top: 4px;" ng-if="vm.option.iFashtion">
                <input type="checkbox" class="filled-in" id="ifashion-box" ng-model="vm.ifashionSelectStuff" />
                <label for="ifashion-box" ng-click="ifashionChoose()"><img src="http://trendata.oss-cn-hangzhou.aliyuncs.com/marketconditions/ifashion.png" alt="ifashion" width="100"></label>
            </div>
        </div>
        <form name="formSS" class="clearfix inline-block">
            <!-- 关键词 -->
            <div class="input-field mr10" ng-if="vm.option.q">
                <input id="keyWordFilter" type="text" class="validate" ng-model="vm.copy.q" style="width: 130px;">
                <label for="keyWordFilter" class=""><i class="search icon"></i>关键词搜索</label>
            </div>
            <!-- 标题 -->
            <div class="input-field mr10" ng-if="vm.option.title">
                <input id="keyWordFilter" type="text" class="validate" ng-model="vm.copy.title" style="width: 130px;">
                <label for="keyWordFilter" class=""><i class="search icon"></i>标题搜索</label>
            </div>
            <!-- sellAmount -->
            <div class="input-field mr10" ng-if="vm.option.sellAmount">
                销售量
                <input class="pl5" ng-class="{error:!formSS.minCount.$valid && formSS.minCount.$dirty}" type="number" name="minCount" placeholder="销售下限" ng-model="vm.copy.lowSellAmount" 

                ng-compare compare-op="gt" compare-to="0" style="width: 100px;" 

                
                uib-tooltip="销售量下限不能小于0" 
                tooltip-placement="top" 
                tooltip-enable="{{formSS.minCount.$invalid}}" 
                > 
                至
                <input class="pl5" ng-class="{error:!formSS.maxCount.$valid && formSS.maxCount.$dirty}" type="number" name="maxCount" placeholder="销售上限" ng-model="vm.copy.highSellAmount" ng-compare compare-op="gt" compare-to="vm.copy.lowSellAmount" style="width: 100px;" 


                uib-tooltip="{{formSS.maxCount.$error.compareTo ?'销售额上限 不能小于 销售量下限':'销售额上限不能小于0'}}"
                tooltip-placement="top" 
                tooltip-enable="{{formSS.maxCount.$invalid}}"
               
                >
            </div>
            <!-- price -->
            <div class="input-field mr10" ng-if="vm.option.price">
                成交均价
                <input class="pl5" ng-class="{error:!formSS.min.$valid && formSS.min.$dirty}" type="number" name="min" placeholder="均价下限" ng-model="vm.copy.lowPrice" ng-compare compare-op="gt" compare-to="0"  style="width: 100px;"

                uib-tooltip="成交均价不能小于0" 
                tooltip-placement="top" 
                tooltip-enable="{{formSS.min.$invalid}}" 
                > 
                至
                <input class="pl5" ng-class="{error:!formSS.max.$valid && formSS.max.$dirty}" type="number" name="max" placeholder="均价上限" ng-model="vm.copy.highPrice" ng-compare compare-op='gt' compare-to='vm.copy.lowPrice'

                uib-tooltip="{{formSS.max.$error.compareTo ?'成交均价上限 不能小于 成交均价下限':'成交均价上限不能小于0'}}"
                tooltip-placement="top" 
                tooltip-enable="{{formSS.maxCount.$invalid}}"
                style="width: 100px;">
            </div>
            <!-- 上新时间 -->
            <div class="input-field mr10" ng-if="vm.option.time">
                上市时间
                <input class="pl5" ng-model="vm.copy.lowImportTime" datetime-picker date-format="yyyy-MM-dd HH:mm:ss" style="width: 145px;" placeholder="上市时间下限"> 
                至
                <input class="pl5" ng-class="{error:!formSS.time.$valid && formSS.time.$touched}" name="time" datetime-picker date-format="yyyy-MM-dd HH:mm:ss" year="{{vm.copy.lowImportTime | year}}" month="{{vm.copy.lowImportTime | month}}" day="{{vm.copy.lowImportTime | day}}" ng-model="vm.copy.highImportTime"
                ng-compare compare-op='gt' compare-to='vm.copy.lowImportTime'
                uib-tooltip="上市时间上限 不能小于 上市时间下限"
                tooltip-placement="top" 
                tooltip-enable="{{formSS.time.$invalid}}"

                style="width: 145px;" placeholder="上市时间上限">
            </div>
            <a id="btn_tool_ok" class="waves-effect waves-light btn" ng-class="{'disabled': formSS.$invalid || formSS.$invalid}" ng-click="vm.search()" ng-if="!vm.option.noBtn">确定</a>
            <button type="button" class="btn btn-default" ng-click="vm.reset()" ng-if="!vm.option.noBtn">重置</button>
        </form>
    </div>
</div>
